// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// #pragma once

#ifndef __HARPER_BOARD_V1_0_H
#define __HARPER_BOARD_V1_0_H

#include "driver/spi_master.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
    ESP32-Harper V1.0
*/

typedef enum {
    NULL_RESOURCE,
    BOARD_I2C0_ID,
    BOARD_SPI2_ID,
}board_res_id_t;



/* spi io define */
#define BOARD_IO_SPI2_SCK           GPIO_NUM_33
#define BOARD_IO_SPI2_MISO          -1
#define BOARD_IO_SPI2_MOSI          GPIO_NUM_32

/* lcd io define */
#define BOARD_IO_LCD_CS             GPIO_NUM_22
#define BOARD_IO_LCD_CLK            BOARD_IO_SPI2_SCK
#define BOARD_IO_LCD_MOSI           BOARD_IO_SPI2_MOSI
#define BOARD_IO_LCD_DC             GPIO_NUM_19
#define BOARD_IO_LCD_RST            -1
#define BOARD_IO_LCD_BL             GPIO_NUM_27
#define BOARD_LCD_SPI_CLOCK_FREQ    SPI_MASTER_FREQ_26M            //非IOMUX配置,最大为26MHz


#ifdef __cplusplus
}
#endif

#endif
